package com.example.demo_mysql_mybatisplus.util.responce.results.filler.core;


import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import lombok.Data;

import java.util.LinkedList;
import java.util.List;

@Data
public class Handler {

    public Handler() {
        fillFields = new LinkedList<>();
        responceEntitys = new LinkedList<>();
        byFieldValues = new LinkedList<>();
    }

    private String useMethod;
    private Class targetClass;
    private String byField;
    private List<String> fillFields ;

    private List<Object> byFieldValues ;
    private List<Object> responceEntitys;

    public boolean checkParams(){
        return StrUtil.isNotEmpty(useMethod)
                && targetClass !=null
                && StrUtil.isNotEmpty(byField)
                && CollUtil.isNotEmpty(fillFields)
                ;
    }

}